/*
 * @Author: yanjikun
 * @Date: 2022-06-13 14:24:37
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-06-16 10:56:03
 * @Description: file content
 */
import { MockMethod } from 'vite-plugin-mock'
export default [
  {
    url: '/api/v1/users/:id/ofOrg',
    method: 'get',
    response: () => {
      return {
        code: 1,
        msg: '成功',
        data: [
          {
            id: 3,
            org: 3,
            orgName: '',
            category: 3,
            login: 'admin',
            username: 'Admin',
            status: 1,
            insertBy: 'admin',
            insertAt: '2018-10-17 09:53:49',
            phone: '13574985231',
            msgPush: false,
          },
          {
            id: 245,
            org: 3,
            orgName: '',
            category: 3,
            login: 'bb',
            username: 'bb',
            status: 1,
            insertBy: 'admin',
            insertAt: '2022-03-01 09:34:16',
            phone: '18080439078',
            msgPush: false,
          },
          {
            id: 272,
            org: 3,
            orgName: '',
            category: 3,
            login: '18384152339',
            username: '18384152339',
            status: 1,
            insertBy: 'admin',
            insertAt: '2022-04-08 10:24:59',
            phone: '18384152339',
            msgPush: false,
          },
        ],
      }
    },
  },
  {
    url: '/api/v1/users/add',
    method: 'post',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
  {
    url: '/api/v1/users/:id/byId',
    method: 'get',
    response: () => {
      return {
        code: 1,
        msg: '成功',
        data: {
          id: 3,
          org: 3,
          orgName: '',
          category: 3,
          login: 'admin',
          username: 'Admin',
          status: 1,
          insertBy: 'admin',
          insertAt: '2018-10-17 09:53:49',
          phone: '13574985231',
          msgPush: false,
          roles: [29],
        },
      }
    },
  },
  {
    url: '/api/v1/users/info/:id',
    method: 'put',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
  {
    url: '/api/v1/users/:id',
    method: 'delete',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
  {
    url: '/api/v1/users/:id/resetPassword',
    method: 'post',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
  {
    url: '/api/v1/users/:id/disable',
    method: 'post',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
  {
    url: '/api/v1/users/:id/enable',
    method: 'post',
    response: () => {
      return { code: 1, msg: '成功', data: true }
    },
  },
] as MockMethod[]
